<html>

<head>

<link rel="stylesheet" type="text/css" href="${def:context}/default.css" />

<!--biblioteca generica JS/Dinamica-->
<script type="text/javascript" src="${def:context}/action/script">
	</script>
<script language="JavaScript" type="text/javascript" src="${def:context}/js/getResponse.js"></script>
<title>取消房主</title>

</head>

<body>

<!--banner-->
<div class="banner" style="height: 15px; margin-bottom: 0px; font-weight: normal">
	<div style="float: left">取消房主</div>
	<div style="float: right">
		<img src="${def:context}/images/close.gif" class="button" onclick="parent.pickClose()" title="关闭">
	</div>
</div>
<center>
<div id="form">
<form name="form2" style="margin-top:0px;margin-bottom:0px;">
<input name="tuid" type="hidden" value="${fld:tuid}">
<input name="h_tuid" type="hidden" value="${fld:h_tuid}">
<input name="master_tuid" type="hidden" value="${fld:master_tuid}">
<TABLE class="table_comm" cellSpacing=0 cellPadding=0 width="100%" border=0>
	<tr>
		<td class="th20">姓名</td>
		<td class="td20left">
			<input name="master_name" type="text" size="10" maxlength="25" value="${fld:master_name}" readonly>
		</td>
	</tr>
	<tr>
		<td class="th20">楼号</td>
		<td class="td20left">
			<input name="house_name" type="text" size="10" maxlength="25" value="${fld:house_name}" readonly>
		</td>
	</tr>

	<tr>
		<td align="center" colspan=1>
			<input type="button" class="cmd" value="取消该房主" onclick="return cancelMaster()">
		</td>
		<td>
			<input type="button" class="cmd" value="关闭" onclick="javascript:parent.pickClose();" >
		</td>
	</tr>
</form>
</div>

<div id="status" class="alert" style="display: none; color: gray; width: 60%; font-weight: normal; font-family: Arial; margin-top: 10px">
	<img src="${def:context}/images/progress.gif"> 请等待
</div>

<!--panel de respuesta AJAX-->
<div id="response" style="display: none; width: 100%; margin-top: 7px">
</div>

</center>

</body>

<!--codigo de soporte del template-->
<script type="text/javascript">

		function cancelMaster()
		{
			var tip = "确定要取消该房主？";
			if("${fld:house_status}" == "4"){
				tip = "该楼源已经结算，如果取消的话将删除该楼源的结算信息，" + tip;
			}else if("${fld:house_status}" == "6"){
				tip = "该楼源已经结算审核，如果取消的话将删除该楼源的结算信息，" + tip;
			}
			if(window.confirm(tip)){
				return ajaxCall(	httpMethod="POST", 
									uri="${def:actionroot}/update", 
									divResponse=null, 
									divProgress="status", 
									formName="form2", 
									afterResponseFn=null, 
									onErrorFn=null);
			}
		}
		
</script>


</html>
